<!DOCTYPE html>
<html>
<head>
<title> 挖一下，忘记密码 Powered By PHPKind</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 使用QLib控件是必须包含样式表 -->
<link rel="stylesheet" type="text/css" href="{$app:qlib/}/ui.css" />
<link rel="stylesheet" type="text/css" href="{$themes:path/}/all.css" />
<link rel="stylesheet" type="text/css" href="{$themes:path/}/style.css" />
<link rel="stylesheet" type="text/css" href="{$themes:path/}/registeruser.css" />

<script src="{$app:qlib}/Q.js">
<!--
import utils.stl;
import utils.json2;
import utils.ajax;
//-->
</script>
<script>
<!--
Q.Ready(function(){

Q.$('get-pwd').onclick = function() {
  var name = Q.$('name').value;
  var email = Q.$('email').value;
  if(!name || !email) {
    alert('用户名和邮箱地址不能为空');
	return;
  }

  Q.Ajax({
    command: '{$app:module}&action=do-forgotpwd',
	data : {name:name, email:email},
	oncomplete : function(xmlhttp) {
	  try {
		var resp = eval('('+xmlhttp.responseText+')');
		//if(resp.header != 0) {
		  Q.$("msg-email").innerHTML = resp.data;
		//} else {
		//  Q.$("msg-email").innerHTML = '';
		//}
	  } catch (e) {
        Q.$("msg-email").innerHTML = xmlhttp.responseText;
	  }
	}
  });
}


Q.$("forget-2").style.display = 'none';

});

//-->
</script>

</head>

<body>
<div class="regtop">
	<ul>
		<li><a href="{$app:app}">首页</a></li>
		<li><a href="{$app:app}&mod=user&action=register">注册</a></li>
		<li><a href="{$app:app}&mod=user&action=login">登录</a></li>
	</ul>
</div>
<div class="regtitle">
	<strong>忘记密码</strong>
</div>
<div class="regmain" style="height:300px;" id="forget-1">
用户名：&nbsp;&nbsp;<input id="name" type=text value="{$fields:authkey/}" />
<br/><br/>
验证邮箱: <input id="email" type=text value="{$fields:authkey/}" />
<br/><br/>
<button id="get-pwd">找回密码</button>
</div>
<div class="regmain" style="height:300px;" id="forget-2">
密码重置邮件已经发送到邮箱，请注意查收!
</div>

<!--用户中心底部-->
<div class="footer">
	<span class="copyright">Powered by <a href="http://wayixia.com">wayixia.com</a> Copyright &copy;2013-2015 </span>
</div>
<!--//用户中心底部-->

</body>
</html>
